package com.lotter.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lotter.dao.UserMapper;
import com.lotter.model.common.Common;


/**
 * Class : 管理员业务层
 * 
 * @author wuzhixuan
 * @datetime 2015-10-08下午3:15:54
 * @version
 */
@Service
public class ManagerService {

    @Autowired
    private UserMapper       userMapper;
    

    public Common getCommon(){
    	Common common=userMapper.getCommonInfo(null);
    	if(common!=null){
    		common.setUserCount(userMapper.getUserCount(null));
    		common.setHousercount(userMapper.getUserCount(2));
    		Long swin = userMapper.getHourswin(2);
    		if(swin!=null){
    			common.setHousermount(swin);
    		}
    	}
    	return common;
    }
  
}

